<div class="main-content form signup-form page-middle">
    <h2 class="menu_select"><?php echo __('Sign up for True News World') ?></h2>
<?php
echo $this->Form->create('User', array('class' => 'form-customize','onSubmit' => 'return checkEmail()'));
echo $this->Form->hidden('plan', array('value' => $plan));
?>
<fieldset>
    <legend><?php echo __('The basic information') ?></legend   >
    <?php echo $this->Form->input('first_name', array('label' => __('First name (<span class="star_required">*</span>)'))) ?>
    <?php echo $this->Form->input('last_name', array('label' => __('Last name (<span class="star_required">*</span>)'))) ?>
    <?php 
    //echo $this->Form->input('username', array('label' => __('Username (<span class="star_required">*</span>)')))
    ?>
    <?php echo $this->Form->input('email', array('label' => __('Email (<span class="star_required">*</span>)'))) ?>
    <?php echo $this->Form->input('confirm_email', array('label' => __('Confirm Email (<span class="star_required">*</span>)'),'div' => array('id' => 'confirmEmail'))) ?>
    <?php 
        //echo $this->Form->input('password', array('label' => __('Password (<span class="star_required">*</span>)')))
    ?>
    

</fieldset>
<fieldset>
    <legend><?php echo __('Contact infomation') ?></legend>
   <?php echo $this->Form->input('phone', array('type' => 'text', 'label' => __('Phone (<span class="star_required">*</span>)'))) ?>
    <?php echo $this->Form->input('house_number', array('label' => __('Address (<span class="star_required">*</span>)'))) ?>
    <?php echo $this->Form->input('street', array('label' => __('Street (<span class="star_required">*</span>)'))) ?>
    <?php echo $this->Form->input('city', array('label' => __('City/Province (<span class="star_required">*</span>)'))) ?>
    <?php echo $this->Form->input('country') ?>
</fieldset>
    
<fieldset class="selected_option">
    <legend><?php echo __('Payment method') ?></legend>
    <div class="payment">
        <?php echo $this->Form->radio('payment_method', array('Pick up' =>__('Pick up')), array('legend' => false, 'checked' => true, 'hiddenField' => false)) ?>
        <?php echo $this->Form->radio('payment_method', array('Paypal' =>  __('Paypal')), array('legend' => false, 'hiddenField' => false)) ?>
    </div>
</fieldset>
<?php echo $this->Form->submit('Sign up', array('label' => false, 'class' => 'btn btn-large btn-success'))?>
<?php
echo $this->Form->end()
?>
</div>
<script>
    function checkEmail(){
        if($('#UserEmail').val() != $('#UserConfirmEmail').val()){
            $('#confirmEmail').addClass('error');
            $('#UserEmail').next().remove();
            $('#UserEmail').parent().append('<div class="error-message">Email are not the same.</div>');
            $('#UserConfirmEmail').next().remove();
            $('#UserConfirmEmail').parent().append('<div class="error-message">Email are not the same.</div>');
            return false;
        }
    }
</script>